<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function DateDemo() {
            var d, s = "今天日期是：";
            d = new Date();
            s += d.getMonth() + "/";
            s += d.getDate() + "/";
            s += d.getFullYear();
            // return s;
            console.log(s)
        }

        DateDemo()
    </script>
</body>

</html>